package com.nongfuspring.nongfu.mapper;

import com.nongfuspring.nongfu.pojo.Opinion;
import com.nongfuspring.nongfu.pojo.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
    User findUserByName(String username);

    int add(User user);

    List<User> getUsers(int pageSizes,int pageNum);

    Integer updateUser(User user);

    Integer setRoleForUser(Integer userid, Integer roleid);

    String getcardnumber(String cardNumber);

    Integer addOpinion(Opinion opinion);

    Integer queryUserBynUmber(String username, String usernumber);

    Integer getTotalUsers();

    Integer deleteUser(String username);
}
